<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
?>



<?

//接收需要修改的数据的id
//统一设置一下保存图片的路径
$_uf['path'] = ROOT_PATH_ . "/uploadfiles/";

//上传icon
if (is_uploaded_file($_FILES['photo']['tmp_name'])) {
    $_uf['upfile']       = $_FILES['photo'];
    $_info               = upload_file($_uf);
    $_REQUEST['ai_photo'] = $_info['name'];
    $icon                = $_REQUEST['ai_photo'];
}
$new_detail_nid = addslashes($_REQUEST['nid']);

//传递过来的页面信息。返回的时候，会根据这些信息返回原来的页面
$nowpageid      = addslashes($_REQUEST['nowpageid']);
$sortby         = addslashes($_REQUEST['sortby']);
$sys_part       = addslashes($_REQUEST['sys_part']);


$_REQUEST['ai_authur']      = $_SESSION['username'];


//设置需要搜索的表格的前缀后缀
$table        = $table_Prefix . "employee";


//重置密码
if($_REQUEST['ai_password'] == ''){
    unset($_REQUEST['ai_password']);
}
else{
    $_REQUEST['ai_password'] = md5($_REQUEST['ai_password']);
}



//if(isset($_REQUEST['ai_weixin_send'])){
//	$_REQUEST['ai_weixin_send'] = implode(',',$_REQUEST['ai_weixin_send']);
//}
//else{
//	$_REQUEST['ai_weixin_send'] = '';
//}

if($_REQUEST['ai_binding'] == '取消'){
	$_REQUEST['ai_openid'] = ''; //把open_id清空	
}
unset($_REQUEST['ai_binding']);

$sql=update_date($table,$_REQUEST,"nid",$new_detail_nid);

$query = mysql_query($sql) or die ($sql);
mysql_close($con);

?>



<?

$nowpageid = $_GET["nowpageid"];

?>


<script type="text/javascript">

     alert("输入信息已保存，点击确认返回继续操作.");
     document.location.href = "detail-statistic.php?nowpageid=<? echo $nowpageid ?>&sortby=<? echo $sortby?>&nid=<? echo $new_detail_nid ?>&sys_part=<? echo $sys_part ?>"

</script>


</body>
